﻿<UserControl x:Class="DynamicChart.UI.SliderBlock"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d"
    d:DesignHeight="60" d:DesignWidth="80" FontSize="20">
    <UserControl.Resources>
        <Storyboard x:Name="StoryboardHighlight">
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="_ctlText">
                <EasingColorKeyFrame KeyTime="0" Value="#FFA7B3FF"/>
                <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FFE7EBEF"/>
            </ColorAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="_ctlReflection">
                <EasingColorKeyFrame KeyTime="0" Value="#00E2E2E2"/>
                <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#00F7F7F7"/>
            </ColorAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="_ctlReflection">
                <EasingColorKeyFrame KeyTime="0" Value="#FF001AFF"/>
                <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FF9B9B9B"/>
            </ColorAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RenderTransform).ScaleX" Storyboard.TargetName="_ctlGridText">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.7"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RenderTransform).ScaleY" Storyboard.TargetName="_ctlGridText">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.7"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
        <Storyboard x:Name="StoryboardNormal">
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(SolidColorBrush.Color)" Storyboard.TargetName="_ctlText">
                <EasingColorKeyFrame KeyTime="0" Value="#FFE7EBFF"/>
                <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FFA7B3FF"/>
            </ColorAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(GradientBrush.GradientStops)[1].(GradientStop.Color)" Storyboard.TargetName="_ctlReflection">
                <EasingColorKeyFrame KeyTime="0" Value="#00F7F7F7"/>
                <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#00E2E2E2"/>
            </ColorAnimationUsingKeyFrames>
            <ColorAnimationUsingKeyFrames Storyboard.TargetProperty="(TextBlock.Foreground).(GradientBrush.GradientStops)[0].(GradientStop.Color)" Storyboard.TargetName="_ctlReflection">
                <EasingColorKeyFrame KeyTime="0" Value="#FF9B9B9B"/>
                <EasingColorKeyFrame KeyTime="0:0:0.3" Value="#FF001AFF"/>
            </ColorAnimationUsingKeyFrames>

            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RenderTransform).ScaleX" Storyboard.TargetName="_ctlGridText">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.7"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RenderTransform).ScaleY" Storyboard.TargetName="_ctlGridText">
                <EasingDoubleKeyFrame KeyTime="0" Value="1"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0.7"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid x:Name="LayoutRoot">
        <Grid Margin="0,0,0,5" HorizontalAlignment="Stretch" VerticalAlignment="Bottom">
            <Border BorderBrush="#FFE4D6D6" HorizontalAlignment="Stretch" Margin="0,0,0,2" BorderThickness="1,0,1,1" VerticalAlignment="Bottom" Height="10">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                        <ColumnDefinition Width="*"/>
                    </Grid.ColumnDefinitions>
                    <Border BorderBrush="#FFE4D6D6" Height="3" BorderThickness="0,0,1,0" VerticalAlignment="Bottom" Grid.Column="0"/>
                    <Border BorderBrush="#FFE4D6D6" Height="3" BorderThickness="0,0,1,0" VerticalAlignment="Bottom" Grid.Column="1"/>
                    <Border BorderBrush="#FFE4D6D6" Height="3" BorderThickness="0,0,1,0" VerticalAlignment="Bottom" Grid.Column="2"/>
                    <Border BorderBrush="#FFE4D6D6" Height="5" BorderThickness="0,0,1,0" VerticalAlignment="Bottom" Grid.Column="3"/>
                    <Border BorderBrush="#FFE4D6D6" Height="3" BorderThickness="0,0,1,0" VerticalAlignment="Bottom" Grid.Column="4"/>
                    <Border BorderBrush="#FFE4D6D6" Height="3" BorderThickness="0,0,1,0" VerticalAlignment="Bottom" Grid.Column="5"/>
                    <Border BorderBrush="#FFE4D6D6" Height="3" BorderThickness="0,0,1,0" VerticalAlignment="Bottom" Grid.Column="6"/>
                </Grid>
            </Border>
            
        </Grid>
        <Grid Name="_ctlGridText" Margin="0,5,0,0" HorizontalAlignment="Stretch" VerticalAlignment="Center" RenderTransformOrigin="0.5,0.5">
            <TextBlock x:Name="_ctlReflection" Margin="0,17,0,0" TextWrapping="Wrap" Text="{Binding Path=Text,ElementName=_ctlText}" RenderTransformOrigin="0.5,0.5" HorizontalAlignment="Center">
				<TextBlock.Effect>
					<BlurEffect Radius="2"/>
				</TextBlock.Effect>
				<TextBlock.Foreground>
					<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
						<GradientStop Color="#FF001AFF" Offset="1"/>
						<GradientStop Color="#00E2E2E2"/>
					</LinearGradientBrush>
				</TextBlock.Foreground>
				<TextBlock.Projection>
					<PlaneProjection RotationX="-180"/>
				</TextBlock.Projection>
            </TextBlock>
            <TextBlock x:Name="_ctlLight" Margin="0" TextWrapping="Wrap" Text="{Binding Path=Text,ElementName=_ctlText}" Foreground="#FF0027FF" HorizontalAlignment="Center">
				<TextBlock.Effect>
					<BlurEffect/>
				</TextBlock.Effect>
            </TextBlock>
            <TextBlock x:Name="_ctlText" Margin="0" TextWrapping="Wrap" Text="2022" Foreground="#FFA7B3FF" HorizontalAlignment="Center"/>

            <Grid.RenderTransform>
                <ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
            </Grid.RenderTransform>
        </Grid>
    </Grid>
</UserControl>
